package com.cys.mybatis.session;

import java.util.List;

/**
 * @Author: cys
 * @description:用于执行sql，获取映射器， 管理事务
 * @CreateTime: 2024-10-24  19:02
 * @Version: 1.0
 */
public interface SqlSession {

    <T> T selectOne(String statement);

    <T> T selectOne(String statement, Object parameter);

    <E> List<E> selectList(String statement, Object parameter);

    int insert(String statement, Object parameter);

    int update(String statement, Object parameter);

    Object delete(String statement, Object parameter);

    void commit();

    void close();

    void clearCache();

    <T> T getMapper(Class<T> type);

    Configuration getConfiguration();
}
